from dm_client import DMClient, DMClientConfig

def main():
    # 初始化客户端
    config = DMClientConfig(server_url="http://localhost:8080")
    client = DMClient(config)
    
    # 添加字段
    db_name = "HY_ZGGL_DB"
    table_name = "A01"
    column_name = "A1111"
    column_type = "VARCHAR(100)"
    comment = "测试MCP"
    
    print(f"Adding column {column_name} to {db_name}.{table_name}")
    success = client.add_column(db_name, table_name, column_name, column_type, comment)
    
    if success:
        print("Column added successfully!")
    else:
        print("Failed to add column")

if __name__ == "__main__":
    main()
